#ifndef ILLIB_BASICLINKEDLIST_H_
#define ILLIB_BASICLINKEDLIST_H_

#include <stdint.h>
#include <stddef.h>

namespace illib {
	namespace BasicLinkedList{
		class List;
		class GenericLinkedList_;
		class Node {
		private:
			Node(const Node &other);
		protected:
			Node* next_;
			Node* prev_;
			friend class List;
			friend class Iterator;
		public:
			Node();
		};

		class Iterator {
		private:
			Iterator(const Iterator &other);
			Iterator();
		protected:
			Node* current_;
		public:
			Iterator(List& list, bool end = false);
			Node* current();
			void current(Node* current);
			Node* next();
			Node* prev();
		};

		class List {
		private:
			List(const List &other);
			friend class BasicLinkedList::Iterator;
		protected:
			Node* head_;
			Node* tail_;
			size_t length_;
		public:
			List();
			size_t length();
			void clear();
			Node* head();
			Node* tail();
			Node* add(Node& element, size_t index);
			Node* remove(size_t index);
			Node* remove(Node& element);
			Node* remove(Iterator& element);
			Node* get(size_t index);
		};
	}
}

#endif /* ILLIB_BASICLINKEDLIST_H_ */
